package com.example.springmvcproject.Service.Inteface;

import com.example.springmvcproject.Utils.ResultMessage;
import com.example.springmvcproject.Vo.*;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

public interface UserService {
    /**
     * 插入一个用户
     * @param userVo 前端传递账号密码
     * @return 结果集
     */
    ResultMessage insertUser(UserVo userVo);

    /**
     * 通过用户名密码登录并返回token
     * @param userVo
     * @return
     */
    ResultMessage getLoginByAccountAndPassword(UserVo userVo);


    /**
     * 修改原密码
     * @param updatePasswordVo
     * @return
     */
    ResultMessage updatePassword(UpdatePasswordVo updatePasswordVo);

    /**
     * 根据条件查询用户
     * @param userSelectiveVo
     * @return
     */
    ResultMessage selectUsersBySelective(UserSelectiveVo userSelectiveVo);

    /**
     * 根据用户ID和用户名删除用户
     * @param userDelVo
     * @return
     */
    ResultMessage deleteUserByIdAndAccount(UserDelVo userDelVo);

    /**
     * 上传文件
     * @param uploadVo
     * @param request
     * @return
     */
    ResultMessage uploadAuthor(UploadVo uploadVo, HttpServletRequest request) throws IOException;
}
